package com.dongxing.concyrrency.chapter2;

import lombok.Data;

/**
 * @author XavierDong
 **/
@Data
public class TaxCalculator {

    private final Double salary;
    private final Double bonus;
    private final CalculatorStrategy calculatorStrategy;

    public double calcuate() {
        return this.calcTax();
    }

    public Double calcTax() {
        return this.calculatorStrategy.calculate(this.salary, this.bonus);
    }
}
